package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaListaPedido extends javax.swing.JFrame {
	private JPanel pnlFondoLista;
	private JTable tbPedido;
	private JButton bntModificar;
	private JButton btnIncluir;
	private JLabel lblTitulo;
	private JLabel lblImagen;
	private JScrollPane scpListaPedido;

	
	public VentanaListaPedido() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				pnlFondoLista = new JPanel();
				getContentPane().add(pnlFondoLista, BorderLayout.CENTER);
				pnlFondoLista.setBackground(new java.awt.Color(255,255,255));
				pnlFondoLista.setLayout(null);
				pnlFondoLista.setPreferredSize(new java.awt.Dimension(527, 330));
				{
					scpListaPedido = new JScrollPane();
					pnlFondoLista.add(scpListaPedido);
					scpListaPedido.setBounds(74, 122, 508, 209);
					scpListaPedido.setBackground(new java.awt.Color(255,255,255));
					{
						TableModel tbPedidoModel = 
								new DefaultTableModel(
										new String[][] { {}, {} },
										new String[] {});
						tbPedido = new JTable();
						scpListaPedido.setViewportView(tbPedido);
						tbPedido.setModel(tbPedidoModel);
						tbPedido.getTableHeader().setBackground(new java.awt.Color(30,181,255));
						tbPedido.setGridColor(new java.awt.Color(0,0,0));
					}
				}
				{
					lblImagen = new JLabel();
					pnlFondoLista.add(lblImagen);
					lblImagen.setBounds(0, 19, 56, 415);
					lblImagen.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/fondo7.jpg")));
				}
				{
					lblTitulo = new JLabel();
					pnlFondoLista.add(lblTitulo);
					lblTitulo.setBounds(207, 44, 261, 35);
					lblTitulo.setText("Lista de Pedidos");
					lblTitulo.setFont(new java.awt.Font("Bitstream Charter",0,22));
				}
				{
					btnIncluir = new JButton();
					pnlFondoLista.add(btnIncluir);
					btnIncluir.setBounds(170, 359, 67, 22);
					btnIncluir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Incluir2.jpg")));
					btnIncluir.setSize(93, 31);
					btnIncluir.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnIncluir.setRolloverIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Incluir.jpg")));
					btnIncluir.setActionCommand("Incluir Pedido");
				}
				{
					bntModificar = new JButton();
					pnlFondoLista.add(bntModificar);
					bntModificar.setBounds(291, 363, 93, 31);
					bntModificar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Modifi2.jpg")));
					bntModificar.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					bntModificar.setRolloverIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/Boton_Modifi.jpg")));
					bntModificar.setActionCommand("Modificar");
				}
			}
			pack();
			this.setSize(641, 464);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void agregarListener(ActionListener accion) {

		btnIncluir.addActionListener(accion);
	
	
	}

}
